﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Db = MSAcademic.v2.Database;

namespace MSAcademic.v2.Infrastructure.Article.Impl
{
    public partial class ArticleImpl : IArticle
    {
        public int Id { get; set; }
        public string Title { get; set; }
        public string ShortText { get; set; }
        public string LongText { get; set; }
        public bool IsHidden { get; set; }
        public DateTimeOffset CreatedOn { get; set; }
        public DateTimeOffset? PublishedOn { get; set; }
        public int UserId { get; set; }
        public string PictureUrlBig { get; set; }
        public string PictureUrlNormal { get; set; }
        public string PictureUrlThumbnail { get; set; }
    }

    public partial class ArticleImpl
    {
        public ArticleImpl()
        {
            
        }

        public ArticleImpl(Db.Article article)
        {
            Id = article.Id;
            Title = article.Title;
            ShortText = article.ShortText;
            LongText = article.LongText;
            IsHidden = article.IsHidden;
            CreatedOn = article.CreatedOn;
            PublishedOn = article.PublishedOn;
            PictureUrlBig = article.PictureUrlBig;
            PictureUrlNormal = article.PictueUrlNormal;
            PictureUrlThumbnail = article.PictureUrlThumbnail;
            UserId = article.UserId;
        }
    }
}
